package tresp.utils;

import robocode.AdvancedRobot;
import robocode.Condition;
import robocode.TeamRobot;


/**
 * 
 * @author <font color="blue">Maxim Kirilov</font>
 *
 */
public class TankInfoImpl implements ITankInfo {

    
    private AdvancedRobot robot;
    
    public TankInfoImpl(AdvancedRobot robot){
	this.robot = robot;
    }
    
    @Override
    public double getX() {
	return robot.getX();
    }

    @Override
    public double getY() {
	return robot.getY();
    }

    @Override
    public double getGunHeading() {
	return robot.getGunHeading();
    }

    @Override
    public double getGunHeat() {
	return robot.getGunHeat();
    }

    @Override
    public double getRadarHeading() {
	return robot.getRadarHeading();
    }

    @Override
    public double getVelocity() {
	return robot.getVelocity();
    }

    @Override
    public double getGunHeadingRadians() {
	return robot.getGunHeadingRadians();
    }

    @Override
    public double getRadarHeadingRadians() {
	return robot.getRadarHeadingRadians();
    }

    @Override
    public double getHeadingRadians() {
	return robot.getHeadingRadians();
    }

    @Override
    public double getEnergy() {
	return robot.getEnergy();
    }

    @Override
    public int getRoundNum() {
	return robot.getRoundNum();
    }

    @Override
    public double getBattleFieldWidth() {
	return robot.getBattleFieldWidth();
    }

    @Override
    public double getBattleFieldHeight() {
	return robot.getBattleFieldHeight();
    }

    @Override
    public double getDistanceRemaining() {
	return robot.getDistanceRemaining();
    }

    @Override
    public boolean isTeammate(String name) {
	if ( robot instanceof TeamRobot){
	    return ((TeamRobot)robot).isTeammate(name);
	}
	return false;
    }

    @Override
    public double getHeading() {
	return robot.getHeading();
    }

    @Override
    public double getGunTurnRemaining() {
	return robot.getGunTurnRemaining();
    }

    @Override
    public long getTime() {
	return robot.getTime();
    }

    @Override
    public void removeCustomEvent(Condition condition) {
	robot.removeCustomEvent(condition);
	
    }

    @Override
    public void addCustomEvent(Condition condition) {
	robot.addCustomEvent(condition);
	
    }

}
